package com.shuqi.interfaces;

/**
 * 事件处理结果类型常量
 * 
 * @author zhangpeng
 * 
 */
public class EventTypeConstants {
    public static final int CONTENT_LOADED = 100;
    public static final int CONTENT_WRITE_ERROR = 101;
    public static final int CONTENT_READ_ERROR = 102;

    public final static int BASE = 0x00;

    // 网络异常

    /** 连网返回数据处理 */
    public static final int EVENT_SUCCESS = BASE - 1;
    /** 手机是否已经连网 */
    public static final int EVENT_EXC_APNNOTEXIST = BASE - 2;

    // 网络/IO异常>-200, <=-100
    /** 网络连接失败 */
    public static final int EVENT_EXC_NETERR = BASE - 100;
    /** 网络连接流异常 返回异常 */
    public static final int EVENT_EXC_IO_1 = EVENT_EXC_NETERR - 1;
    public static final int EVENT_EXC_IO_2 = EVENT_EXC_NETERR - 2;
    public static final int EVENT_EXC_IO_3 = EVENT_EXC_NETERR - 3;
    public static final int EVENT_EXC_IO_4 = EVENT_EXC_NETERR - 4;
    public static final int EVENT_EXC_IO_5 = EVENT_EXC_NETERR - 5;

    /** 网络连接超时 */
    public static final int EVENT_EXC_TIMEOUT = EVENT_EXC_NETERR - 4;

    // 解析异常 >-300,<=-200
    /** 解析格式异常 */
    public static final int EVENT_EXC_PARSER = BASE - 200;

    // 其他异常 >-400,<=-300
    /** url格式异常 */
    public static final int EVENT_EXC_MALFORMEDURL = BASE - 300;

    /** HttpRequest参数错误 */
    public static final int EVENT_EXC_ARGSERR_1 = EVENT_EXC_MALFORMEDURL - 1;
    public static final int EVENT_EXC_ARGSERR_2 = EVENT_EXC_MALFORMEDURL - 2;
    public static final int EVENT_EXC_REQUEST_OTHER = EVENT_EXC_MALFORMEDURL - 3;
    public static final int EVENT_EXC_HTTPSTATUSERR = EVENT_EXC_MALFORMEDURL - 4;
    public static final int EVENT_EXC_ILLEGALSTATE = EVENT_EXC_MALFORMEDURL - 5;
    public static final int EVENT_EXC_FACTORYCONFIGURATION = EVENT_EXC_MALFORMEDURL - 6;
    public static final int EVENT_EXC_PARSERCONFIGURATION = EVENT_EXC_MALFORMEDURL - 7;
    public static final int EVENT_EXC_PARSER_OTHER = EVENT_EXC_MALFORMEDURL - 8;
    // --------未知异常 -400
    /** 未知异常 */
    // public static final int EVENT_EXC_UNKNOWN = EVENT_EXC_MALFORMEDURL - 400;

}
